package demo1.Assignment2;

import demo1.Assignment2.factory.AbstartPhoneFactory;
import demo1.Assignment2.factory.BrandFactory;
import demo1.Assignment2.factory.ColourFactory;

public class PhoneProducer {
    AbstartPhoneFactory getPhoneFactory(int type) {
        if (Constant.PhoneAutribute.BRAND.getValue() == type) {
            return new BrandFactory();
        } else if (Constant.PhoneAutribute.COLOUR.getValue() == type) {
            return new ColourFactory();
        } else {
            return null;
        }
    }
}
